<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE">
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <title>订单详情</title>
     <link rel="icon" href="../img/favicon.ico">

    <link rel="stylesheet" type="text/css" href="../css/all.css" />
    <link rel="stylesheet" type="text/css" href="../css/pages-seckillOrder.css" />
</head>

<body>
    <!-- 头部栏位 -->
    <!--页面顶部-->
<div id="app">
<div id="nav-bottom">
	<!--顶部-->
	<div class="nav-top">
		<div class="top">
			<div class="py-container">
				<div class="shortcut">
					<ul class="fl">
						<li class="f-item">青橙欢迎您！</li>
						<li class="f-item">
								<span v-if="!loginInfo.username">
									请<a th:href="@{/loginUI}">登录</a>
								</span>
						    <span v-if="loginInfo.username">
									{{loginInfo.username}}
									<a href="javascript:void(0)" @click="logout">退出登录</a>
								</span>
						    <span>
									<a th:href="@{/registerUI}">免费注册</a>
								</span>
						</li>
					</ul>
					<div class="fr typelist">
						<ul class="types">
							<li class="f-item"><span><a href="javascript:void(0)" @click="openMyOrder">我的订单</a></span></li>
							
							<li class="f-item"><span><a href="cart.html" target="_blank">我的购物车</a></span></li>
							<li class="f-item"><span><a href="home.html" target="_blank">我的青橙</a></span></li>			
							<li class="f-item"><span>青橙会员</span></li>						
							<li class="f-item"><span>企业采购</span></li>						
							<li class="f-item"><span>关注青橙</span></li>
							<li class="f-item"><span><a href="cooperation.html" target="_blank">合作招商</a></span></li>
							<li class="f-item"><span><a href="shoplogin.html" target="_blank">商家后台</a></span></li>				
							<li class="f-item"><span>网站导航</span></li>
						</ul>
					</div>
					
				</div>
			</div>
		</div>

		<!--头部-->
		<div class="header">
			<div class="py-container">
				<div class="yui3-g Logo">
					<div class="yui3-u Left logoArea">
						<a class="logo-bd" title="青橙"  href="javascript:void(0)" th:href="@{/index}"></a>
					</div>
					<div class="yui3-u Rit searchArea">
						<div class="search">
							<form action="" class="sui-form form-inline">
								<!--searchAutoComplete-->
								<div class="input-append">
									<input type="text" id="autocomplete"   class="input-error input-xxlarge" />
									<button class="sui-btn btn-xlarge btn-danger" type="button">搜索</button>
								</div>
							</form>
						</div>
					</div>
					
				</div>

			</div>
		</div>
	</div>
</div>

    <!--header-->
    <div id="account">
        <div class="py-container">
            <div class="yui3-g home">
                <!--左侧列表-->
                <div class="yui3-u-1-6 list">

                    <div class="person-info">
                        <div class="person-photo"><img src="../img/_/photo.png" alt=""></div>
                        <div class="person-account">
                            <span class="name">{{loginInfo.username}}</span>
                            <span class="safe">账户安全</span>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <div class="list-items">
                        <dl>
							<dt><i>·</i> 订单中心</dt>
							<dd><a th:href="@{/myOrder}">我的订单</a></dd>
							<dd><a th:href="@{/myOrder}">待付款</a></dd>
							<dd><a th:href="@{/myOrder}">待发货</a></dd>
							<dd><a th:href="@{/myOrder}">待收货</a></dd>
						</dl>
							<dt><i>·</i> 设置</dt>
							<dd><a href="center-setting-info.html">个人信息</a></dd>
							<dd><a href="javascript:void(0)" th:href="@{/openAddress}" :class="orderStatus == 2 ? 'list-active' : ''">地址管理</a></dd>
							<dd><a th:href="@{/centerSettingSafe}" >安全管理</a></dd>
						</dl>
                    </div>
                </div>
                <!--右侧主内容-->
                <div class="yui3-u-5-6">
                    <div class="body">
                        <div class="order-detail">
                            <h4>订单详情</h4>
                            <div class="order-bar">
                                <div class="sui-steps-round steps-round-auto steps-4">
                                    <div th:class="${order.orderStatus >= '0' ? 'current' : 'todo'}">
                                        <div class="wrap">
                                        <div class="round">1</div>
                                        <div class="bar"></div>
                                        </div>
                                        <label>
                                            <span>提交订单</span>
                                            <span th:text="${#dates.format(order.createTime,'yyyy-MM-dd')}"></span>
											<span th:text="${#dates.format(order.createTime,'HH:mm:ss')}"></span>
                                        </label>
                                    </div>
                                    <div th:class="${order.orderStatus >= '1' ? 'current' : 'todo'}">
                                        <div class="wrap">
                                        <div class="round">2</div>
                                        <div class="bar"></div>
                                        </div>
                                        <label>
                                            <span>付款成功</span>
                                            <span th:text="${#dates.format(order.createTime,'yyyy-MM-dd')}"></span>
											<span th:text="${#dates.format(order.createTime,'HH:mm:ss')}"></span>
                                        </label>
                                    </div>
                                    <div th:class="${order.orderStatus >= '2' ? 'current' : 'todo'}">
                                        <div class="wrap">
                                        <div class="round">3</div>
                                        <div class="bar"></div>
                                        </div>
                                        <label>
                                            <span>发货</span>
                                            <span th:text="${#dates.format(order.createTime,'yyyy-MM-dd')}"></span>
											<span th:text="${#dates.format(order.createTime,'HH:mm:ss')}"></span>
                                        </label>
                                    </div>
                                    <div th:class="${order.orderStatus >= '3' ? 'current' : 'todo'}">
                                        <div class="wrap">
                                        <div class="round">4</div>
                                        <div class="bar"></div>
                                        </div>
                                        <label>
                                            <span>确认收货</span>
                                            <span th:text="${#dates.format(order.createTime,'yyyy-MM-dd')}"></span>
											<span th:text="${#dates.format(order.createTime,'HH:mm:ss')}"></span>
                                        </label>
                                    </div>
                                    </div>
                            </div>
                            <div class="order-state">
                                <p>当前订单状态：
									<span th:if="${order.orderStatus == '0'}" class="red">待付款</span>
									<span th:if="${order.orderStatus == '1'}" class="red">待发货</span>
									<span th:if="${order.orderStatus == '2'}" class="red">已发货</span>
									<span th:if="${order.orderStatus == '3'}" class="red">已收货</span>
								</p>
                            </div>
                        </div>
                        <div class="order-info">
                            <h5>订单信息</h5>
                            <p th:text="'收货地址：' + ${order.receiverAddress}"> </p>
                            <p th:text="'订单单号：' + ${order.id}"></p>
                            <p th:text="'下单时间：' + ${#dates.format(order.createTime,'yyyy-MM-dd HH:mm:ss')}"></p>
                            <p th:text="'支付时间：' + ${order.payTime == null ? '未支付' : #dates.format(order.payTime,'yyyy-MM-dd HH:mm:ss')}"></p>
                            <p th:text="'支付方式：' + ${order.payType == '0' ? '货到付款' : '在线支付'}"></p>
                            <p th:text="'发货时间：' + ${order.consignTime == null ? '未发货' : #dates.format(order.consignTime,'yyyy-MM-dd HH:mm:ss')}"></p>
                        </div>
                        <div class="order-goods">
                            <table class="sui-table">
                                    <thead>
                                        <th class="center" >商品</th>
                                        <th class="center" >价格</th>
                                        <th class="center" >数量</th>
                                        <th class="center" >优惠</th>
                                        <th class="center" >状态</th>
                                    </thead>                                   
                             
                                <tbody>                               
                                    <tr>
                                        <td colspan="5" th:text="'订单编号：' + ${orderItemSku.id}"></td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="typographic"><img th:src="${orderItemSku.image}" width="82px" height="82px"/>
                                                    <span th:text="${orderItemSku.name}"></span>
                                                    <span th:text="${orderItemSku.spec}" class="guige"></span>
                                                </div>
                                        </td>
                                        <td>
											<ul class="unstyled" th:if="${orderItemSku.price / 100 > 1}">
												<li th:if="${orderItemSku.preMoney == 0}" th:text="'¥' + ${orderItemSku.price / 100} + '.00'"></li>
												<li th:if="${orderItemSku.preMoney > 0}" class="o-price" th:text="'¥' + ${orderItemSku.price / 100} + '.00'"></li>
												<li th:if="${orderItemSku.preMoney > 0}" class="o-price" th:text="'¥' + ${orderItemSku.price - orderItemSku.preMoney / 100} + '.00'"></li>
											</ul>
                                        </td>
                                        <td th:text="${orderItemSku.num}"></td>
                                        <td th:if="${orderItemSku.preMoney == null}">无优惠</td>
										<td th:if="${orderItemSku.preMoney != null}" th:text="'优惠金额：￥' + ${orderItemSku.preMoney / 100}">无优惠</td>
                                        <td th:if="${orderItemSku.orderStatus == 0}">待付款</td>
										<td th:if="${orderItemSku.orderStatus == 1}">待发货</td>
										<td th:if="${orderItemSku.orderStatus == 2}">已发货</td>
										<td th:if="${orderItemSku.orderStatus == 3}">已收货</td>
                                    </tr>
                                </tbody>
                            </table>
                            <div class="order-price">
                                <p th:text="'商品总金额：￥' + ${order.totalMoney / 100}"></p>
                                <p th:if="${order.postFee == null}">运费金额：，免费用</p>
								<p th:if="${order.postFee != null}" th:text="'运费金额：￥' + ${order.postFee}">运费金额：，免费用</p>
                                <p th:if="${order.preMoney == null}">使用优惠券：无</p>
								<p th:if="${order.preMoney != null}" th:text="'优惠金额：￥' + ${order.preMoney / 100}"></p>
                                <h4 class="red"  th:if="${order.payMoney == null}">未支付</h4>
								<h4 class="red"  th:if="${order.payMoney != null}" th:text="'实际支付：￥' + ${order.payMoney / 100}"></h4>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                        <!--猜你喜欢-->
                        <div class="like-title">
                            <div class="mt">
                                <span class="fl"><strong>热卖单品</strong></span>
                            </div>
                        </div>
                        <div class="like-list">
                            <ul class="yui3-g">
                                <li class="yui3-u-1-4" th:each="sku : ${skuBySaleNum}">
                                    <div class="list-wrap">
                                        <div class="p-img">
                                            <img th:src="${sku.image}" />
                                        </div>
                                        <div class="attr">
                                            <em th:text="${sku.name}"></em>
                                        </div>
                                        <div class="price">
                                            <strong>
											<em>¥</em>
											<i th:text="${sku.price}"></i>
										</strong>
                                        </div>
                                        <div class="commit">
                                            <i class="command" th:text="'已有' + ${sku.commentNum} + '人评价'"></i>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- 底部栏位 -->
    <!--页面底部-->
<div class="clearfix footer">
	<div class="py-container">
		<div class="footlink">
			<div class="Mod-service">
				<ul class="Mod-Service-list">
					<li class="grid-service-item intro  intro1">

						<i class="serivce-item fl"></i>
						<div class="service-text">
							<h4>正品保障</h4>
							<p>正品保障，提供发票</p>
						</div>

					</li>
					<li class="grid-service-item  intro intro2">

						<i class="serivce-item fl"></i>
						<div class="service-text">
							<h4>正品保障</h4>
							<p>正品保障，提供发票</p>
						</div>

					</li>
					<li class="grid-service-item intro  intro3">

						<i class="serivce-item fl"></i>
						<div class="service-text">
							<h4>正品保障</h4>
							<p>正品保障，提供发票</p>
						</div>

					</li>
					<li class="grid-service-item  intro intro4">

						<i class="serivce-item fl"></i>
						<div class="service-text">
							<h4>正品保障</h4>
							<p>正品保障，提供发票</p>
						</div>

					</li>
					<li class="grid-service-item intro intro5">

						<i class="serivce-item fl"></i>
						<div class="service-text">
							<h4>正品保障</h4>
							<p>正品保障，提供发票</p>
						</div>

					</li>
				</ul>
			</div>
			<div class="clearfix Mod-list">
				<div class="yui3-g">
					<div class="yui3-u-1-6">
						<h4>购物指南</h4>
						<ul class="unstyled">
							<li>购物流程</li>
							<li>会员介绍</li>
							<li>生活旅行/团购</li>
							<li>常见问题</li>
							<li>购物指南</li>
						</ul>

					</div>
					<div class="yui3-u-1-6">
						<h4>配送方式</h4>
						<ul class="unstyled">
							<li>上门自提</li>
							<li>211限时达</li>
							<li>配送服务查询</li>
							<li>配送费收取标准</li>
							<li>海外配送</li>
						</ul>
					</div>
					<div class="yui3-u-1-6">
						<h4>支付方式</h4>
						<ul class="unstyled">
							<li>货到付款</li>
							<li>在线支付</li>
							<li>分期付款</li>
							<li>邮局汇款</li>
							<li>公司转账</li>
						</ul>
					</div>
					<div class="yui3-u-1-6">
						<h4>售后服务</h4>
						<ul class="unstyled">
							<li>售后政策</li>
							<li>价格保护</li>
							<li>退款说明</li>
							<li>返修/退换货</li>
							<li>取消订单</li>
						</ul>
					</div>
					<div class="yui3-u-1-6">
						<h4>特色服务</h4>
						<ul class="unstyled">
							<li>夺宝岛</li>
							<li>DIY装机</li>
							<li>延保服务</li>
							<li>品优购E卡</li>
							<li>品优购通信</li>
						</ul>
					</div>
					<div class="yui3-u-1-6">
						<h4>帮助中心</h4>
						<img src="../img/wx_cz.jpg">
					</div>
				</div>
			</div>
			<div class="Mod-copyright">
				<ul class="helpLink">
					<li>关于我们<span class="space"></span></li>
					<li>联系我们<span class="space"></span></li>
					<li>关于我们<span class="space"></span></li>
					<li>商家入驻<span class="space"></span></li>
					<li>营销中心<span class="space"></span></li>
					<li>友情链接<span class="space"></span></li>
					<li>关于我们<span class="space"></span></li>
					<li>营销中心<span class="space"></span></li>
					<li>友情链接<span class="space"></span></li>
					<li>关于我们</li>
				</ul>
				<p>地址：北京市昌平区建材城西路金燕龙办公楼一层 邮编：100096 电话：400-618-4000 传真：010-82935100</p>
				<p>京ICP备08001421号京公网安备110108007702</p>
			</div>
		</div>
	</div>
</div>
</div>
<!--页面底部END-->
<script type="text/javascript" src="../js/all.js"></script>
<script type="text/javascript" src="../js/plugins/jquery/jquery.min.js"></script>
<script type="text/javascript" src="../js/pages/index.js"></script>
<script src="https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>
<script th:src="@{/js/vue.js}"></script>
<script th:src="@{/js/axios.js}"></script>
<script th:src="@{/js/interceptor.js}"></script>
<script>
	var vue = new Vue({
		el: '#app',
		data () {
			return {
				// 登录对象
				loginInfo: {},
				// 登录令牌
				token: ''
			}
		},
		methods: {
			// 从Cookie中获取用户信息
			showInfo() {
			    var user = Cookies.get('qingcheng_user')
			    // 把字符串转换json对象
			    if (user) {
			        this.loginInfo = JSON.parse(user)
			    }
			},
			logout () {
			    // 清空cookie值
			    Cookies.set('qingcheng_token', '', {domain: 'localhost'})
			    Cookies.set('qingcheng_user', '', {domain: 'localhost'})
			    // 回到首页面
			    window.location.href='/portal/index'
			},
			// 打开我的订单
			openMyOrder () {
			    if (!this.loginInfo.username) {
			        alert("未登录")
			        window.location.href='/portal/loginUI'
			        return
			    }
			    window.location.href='/portal/myOrder'
			}
		},
		created () {
			this.showInfo()
		}
	})
</script>



</body>

</html>